<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
  /**
   * Run the database seeds.
   *
   * @return void
   */
  public function run()
  {
    User::factory(1)->create([
      'username' => 'admin',
      'role' => 'admin',
    ]);

    User::factory(1)->create([
      'username' => 'fan',
      'mobile' => '13797528120',
      'coins' => 9999,
      'role' => 'member',
      'pid' => 4
    ]);

    User::factory(1)->create([
      'username' => 'mask',
      'security' => '123',
      'role' => 'seller',
      'api_token' => \Str::of(\Str::uuid())->replace('-', ''),
      'code' => makeCode(),
      'notify_url' => 'http://106.13.74.212:9000/api/test'
    ]);

    User::factory(1)->create([
      'username' => 'agency1',
      'role' => 'agent',
      'cut' => random_int(10, 222),
      'code' => makeCode(),
      'freeze_minutes' => 8
    ]);

    User::factory(1)->create([
      'username' => 'admin1',
      'role' => 'admin'
    ]);

    User::factory(1)->create([
      'pid' => 3,
      'role' => 'seller',
      'perms' => ['password', 'security', 'ga']
    ]);

    User::factory(1)->create([
      'username' => 'member1',
      'pid' => 4,
      'fee_ratio' => '0.001',
      'tip' => 1,
    ]);
  }
}
